<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.util.*"%>

<%
DBO db=new DBO();
request.setCharacterEncoding("utf-8");
ResultSet rs=null;
String sql="";
int row=1;
        String id=(String)request.getParameter("id");//id
        String usercount=(String)request.getParameter("usercount");//容纳人数
        String name=(String)request.getParameter("name");//教室名称
        String status=(String)request.getParameter("status");//状态
/*
修改后台页面
*/	
 
sql="update actitvtyroom set id='"+id+"', usercount='"+usercount+"', name='"+name+"', status='"+status+" 'where id='"+id+"'";

 //int row=0;

try{

	System.out.println(sql);
		 row=db.update(sql);
}catch(Exception e){
System.out.println(e.toString());}
if(row==1){
out.println("<script>");
out.println("alert('操作成功');");
out.println("window.location='list.jsp'");
out.println("</script>");
}else{
out.println("<script>");
out.println("alert('操作失败');");
out.println("window.location='list.jsp'");
out.println("</script>");
}
db.close();
%>

